Skip to content

SpeedyWeather v0.19 compat#133

Merged
simone-silvestri merged 17 commits intoNumericalEarth:mainfrom
maximilian-gelbrecht:mg/speedy0-18
Apr 28, 2026
Merged

SpeedyWeather v0.19 compat#133
simone-silvestri merged 17 commits intoNumericalEarth:mainfrom
maximilian-gelbrecht:mg/speedy0-18

Conversation

@maximilian-gelbrecht
Copy link
Copy Markdown
Collaborator

Fixes #132

@simone-silvestri
Copy link
Copy Markdown
Member

Ah apparently we were restricting the version of SpeedyWeather, that is why the tests were still passing

@maximilian-gelbrecht
Copy link
Copy Markdown
Collaborator Author

I think right at the moment that's actually also still a fair assumption to restrict versions. One of the next releases of SpeedyWeather will also def break this again, as we are rewriting the variable system. So restricting the version ensures it actually still works.

@simone-silvestri
Copy link
Copy Markdown
Member

Ok, so shall we keep this PR open such that we can update SpeedyWeather in one go when you guys finished with the variables refactor and in the meantime just add a warning when we load the extension if v > 0.17?

@maximilian-gelbrecht
Copy link
Copy Markdown
Collaborator Author

maximilian-gelbrecht commented Mar 16, 2026

I don't know. I mean this here is just a quick fix, and makes it run with v0.18. Isn't that good in itself?

We'll likely merge the new variable system next week or in two weeks and then wait a bit more for a proper release, and then we could just another small PR. It's just a few lines of code that change here.

@navidcy
Copy link
Copy Markdown
Member

navidcy commented Mar 16, 2026

I think the compat entry for v0.18.1 that this PR adds is appropriate.
Let's merge this. From now on, we support only v0.18.1 or later.
Perhaps that deserves a patch release of NumericalEarth

Comment thread Project.toml Outdated
@navidcy navidcy added atmosphere ⛈️ where the weather happens extension 🧬 labels Mar 16, 2026
@navidcy
Copy link
Copy Markdown
Member

navidcy commented Mar 16, 2026

@maximilian-gelbrecht, after the SpeedyWeather v0.18.1+ that this PR introduces, does it make sense to run the atmosphere in the global_cloupled_simulation.jl example on the GPU?

@maximilian-gelbrecht
Copy link
Copy Markdown
Collaborator Author

As of now, the GPU version is running and also part of the released version, but we don't really consider it fully finished. We invested a good amount of time into the parametrizations, but the dynamical core still needs some optimisations to run more efficiently on GPU.

@navidcy
Copy link
Copy Markdown
Member

navidcy commented Mar 16, 2026

Cool; let's leave transitioning the atmosphere part of the example to GPU for later.

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 16, 2026

Codecov Report

❌ Patch coverage is 0% with 21 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...lEarthSpeedyWeatherExt/speedy_weather_exchanger.jl 0.00% 14 Missing ⚠️
...hSpeedyWeatherExt/speedy_atmosphere_simulations.jl 0.00% 7 Missing ⚠️

📢 Thoughts on this report? Let us know!

@maximilian-gelbrecht
Copy link
Copy Markdown
Collaborator Author

I realised this actually needs a few more minor changes due to other changes to the variables system we did since 0.17.4, not only the signature of the parametrization_tendencies!.

Nothing really major on the NumericalEarth side here, as far as I can see it. Will address those later.

@navidcy
Copy link
Copy Markdown
Member

navidcy commented Mar 16, 2026

Let me know when it’s ready to have a look


Base.summary(::SpeedySimulation) = "SpeedyWeather.Simulation"

# TODO: This is a temporary solution to tell SpeedyWeather to allocate the ocean variables, without having an ocean. In SpeedyWeather PR#969 it will be addressed slightly more properly.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess in the future we want to have ocean=nothing in speedyweather and then we just compute everything here?

Copy link
Copy Markdown
Collaborator Author

@maximilian-gelbrecht maximilian-gelbrecht Mar 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just there because we introduced the first of part of new variable system in 0.18, and it was an oversight of us to not always allocate the sea_surface_temperature somewhere, even with ocean=nothing. SpeedyWeather/SpeedyWeather.jl#969 is the second part of that. We just have to decide where to allocate the sea_surface_temperature (and similar variables for land and sea ice). Once we do that, you can probably do ocean=nothing again.

So yeah, this is just about memory allocation, and not about computations. Those are all here / in Oceananigans anyway.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We went with PrescribedOcean() for now. I think this also makes sense in this case. The ocean isn't non-existent / nothing it is prescribed by NumericalEarth. PrescribedOcean just makes sure that we have the proper variables allocated to be written into by NumericalEarth.

Comment thread ext/NumericalEarthSpeedyWeatherExt/speedy_atmosphere_simulations.jl Outdated
Comment thread ext/NumericalEarthSpeedyWeatherExt/speedy_atmosphere_simulations.jl Outdated
maximilian-gelbrecht and others added 2 commits March 17, 2026 18:00
…ns.jl

Co-authored-by: Navid C. Constantinou <navidcy@users.noreply.github.com>
@maximilian-gelbrecht maximilian-gelbrecht changed the title SpeedyWeather v0.18 compat SpeedyWeather v0.19 compat Apr 23, 2026
@maximilian-gelbrecht
Copy link
Copy Markdown
Collaborator Author

maximilian-gelbrecht commented Apr 23, 2026

I just updated this to version 0.19 that we just released. I still have to check if it actually works.

Locally, I have some trouble running the tests because of a version conflict between Oceananigans and NumericalEarth in the test env. I am a bit confused by that.

@maximilian-gelbrecht
Copy link
Copy Markdown
Collaborator Author

maximilian-gelbrecht commented Apr 23, 2026

My update is just adjusting for syntax changes. We could probably also think about actually using ConservativeRegridding in a follow up, or is it still not ready?

Edit: Ah, I see that's already part of #160

@maximilian-gelbrecht
Copy link
Copy Markdown
Collaborator Author

maximilian-gelbrecht commented Apr 23, 2026

Sorry, this took me a bit, but now the Speedy coupling test passes locally.

@simone-silvestri
Copy link
Copy Markdown
Member

I think this is ready to merge

@simone-silvestri
Copy link
Copy Markdown
Member

Tests are not passing because this is a fork that does not have access to the credentials which are repository secrets. I will merge anyways because the speedy weather coupling tests pass

@simone-silvestri simone-silvestri merged commit 4a1bb91 into NumericalEarth:main Apr 28, 2026
4 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

atmosphere ⛈️ where the weather happens extension 🧬

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wrong signature for SpeedyWeather.parameterization_tendencies! in SpeedyWeatherExt for SpeedyWeather v0.18+

3 participants